<!DOCTYPE html
  PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
  <meta name="robots" content="noindex,nofollow">
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <link href="img/style.css" rel="stylesheet" type="text/css" />
  <link rel="stylesheet" type="text/css" href="layui/css/layui.css" />
  <title>专题添加</title>
  <script src="js/common.js" type="text/javascript"></script>
  <script src="js/main.js" type="text/javascript"></script>
  <script src="js/jquery.min.js" type="text/javascript"></script>
	<script src="js/jquery-form.js" type="text/javascript"></script>	
  <script charset="utf-8" src="editor/kindeditor-min.js"></script>
  <script charset="utf-8" src="editor/lang/zh-CN.js"></script>
  <script src="layui/layui.js" type="text/javascript"></script>
</head>

<body>
  <!--当前导航-->
<div class="layui-card">

  <form id="upload_from1" action="editor/php/upload_json.php" style="display:none" method="post" enctype="multipart/form-data">
    <input type="file" name="imgFile" value="">
  </form>
  <form id="upload_from2" action="editor/php/upload_json.php" style="display:none" method="post" enctype="multipart/form-data">
    <input type="file" name="imgFile" value="">
  </form>
  <form id="upload_from3" action="editor/php/upload_json.php" style="display:none" method="post" enctype="multipart/form-data">
    <input type="file" name="imgFile" value="">
  </form>

  <div class="layui-card-header">专题新增</div>
    <div class="layui-card-body">

      <form id="topicform" action="?action=add" method="post" name="topicform" class="layui-form">
      <input type="hidden" value="" name="enname" id="enname" />
      <input type="hidden" name="keyword" size="50" value=""/>
      <input type="hidden" name="des" size="50" value="" />
      <input type="hidden" id="template" name="template" value="topic.html"/>
      <div style="display: none;"><textarea id="editor_id1" name="v_content1" ></textarea></div>
      <div class="layui-form-item">
        <label class="layui-form-label">专题名称：</label>
        <div class="layui-input-block">
          <input type="text" id="name" name="name" lay-verify="required" placeholder="请输入名称"
            autocomplete="off" class="layui-input" />
        </div>
      </div>

      <div class="layui-form-item">
        <div class="layui-block">
          <label class="layui-form-label">图片地址：</label>
          <div class="layui-input-inline" >
            <input name="pic" type="text" id="pic" value="" size="30" class="layui-input" />
          </div>
          <div class="layui-input-inline" style="width: 80px;">
            <input name="doClear1" type="button" id="doClear1" value="清  除"
              onclick="javascript:document.topicform.pic.value='';" class="layui-btn" />
          </div>
          <div class="layui-input-inline"  style="width: 100px;">
            <input name="upButton11" type="button" id="upButton11" value="选择图片"
              class="layui-btn layui-btn-danger" />
          </div>
          <div class="layui-input-inline"  style="width: 100px;">
            <input name="upButton12" type="button" id="upButton12" value="上传图片"
              class="layui-btn layui-btn-danger" />
          </div>
        </div>
      </div>
      
      <div class="layui-form-item">
        <div class="layui-block">
          <label class="layui-form-label">幻灯图片：</label>
          <div class="layui-input-inline" >
            <input name="spic" type="text" id="spic" value="" size="30" class="layui-input" />
          </div>
          <div class="layui-input-inline" style="width: 80px;">
            <input name="doClear2" type="button" id="doClear2" value="清  除"
              onclick="javascript:document.topicform.spic.value='';" class="layui-btn" />
          </div>
          <div class="layui-input-inline"  style="width: 100px;">
            <input name="upButton21" type="button" id="upButton21" value="选择图片"
              class="layui-btn layui-btn-danger" />
          </div>
          <div class="layui-input-inline"  style="width: 100px;">
            <input name="upButton22" type="button" id="upButton22" value="上传图片"
              class="layui-btn layui-btn-danger" />
          </div>
        </div>
      </div>
      
      <div class="layui-form-item" style="display: none;">
        <div class="layui-block">
          <label class="layui-form-label">背景图片：</label>
          <div class="layui-input-inline" >
            <input name="gpic" type="text" id="gpic" value="" size="30" class="layui-input" />
          </div>
          <div class="layui-input-inline" style="width: 80px;">
            <input name="doClear3" type="button" id="doClear3" value="清  除"
              onclick="javascript:document.topicform.gpic.value='';" class="layui-btn" />
          </div>
          <div class="layui-input-inline"  style="width: 100px;">
            <input name="upButton31" type="button" id="upButton31" value="选择图片"
              class="layui-btn layui-btn-danger" />
          </div>
          <div class="layui-input-inline"  style="width: 100px;">
            <input name="upButton32" type="button" id="upButton32" value="上传图片"
              class="layui-btn layui-btn-danger" />
          </div>
        </div>
      </div>   
            
      <div class="layui-form-item layui-form-text">
        <label class="layui-form-label">专题介绍：</label>
        <div class="layui-input-block">
          <textarea name="content" id="content" placeholder="" class="layui-textarea"></textarea>
        </div>
      </div>

      <div class="layui-form-item">
        <div class="layui-input-block">
          <input type="submit" name="Submit" value="确定提交" lay-submit="" class="layui-btn"/>
          <input type="reset" name="reset" value="清除重置" class="layui-btn layui-btn-primary" />
        </div>
      </div>
    </form>

      </div>
    </div>
  </div>

  <script>
    window.editor = KindEditor.create('#editor_id1', {
      uploadJson: 'editor/php/upload_json.php',
      fileManagerJson: 'editor/php/file_manager_json.php',
      allowFileManager: true,
      afterBlur: function () { this.sync(); }
    });

    bindButtonFile('#upButton11', '#pic',false,false);
    bindButtonUpImage('#upButton12','#upload_from1', '#pic');

    bindButtonFile('#upButton21', '#spic',false,false);
    bindButtonUpImage('#upButton22','#upload_from2', '#spic');

    bindButtonFile('#upButton31', '#gpic',false,false);
    bindButtonUpImage('#upButton32','#upload_from3', '#gpic');
  </script>
</body>

</html>